"""
客户主页面
"""
from selenium.webdriver.common.by import By
from page.base_page import BasePage
class ClientMainPage(BasePage):
    #定位器
    #客户池
    kh_khc_locator = (By.CSS_SELECTOR, "body > div.container > div.page-header > ul > li:nth-child(2) > a")
    #客户关怀
    kh_khgh_locator = (By.LINK_TEXT, "客户关怀")
    #新建客户
    kh_xjkh_locator = (By.LINK_TEXT, "新建客户")
    #客户列表
    kh_khlb_locator =(By.XPATH,'//*[@id="form1"]/table/tbody')


    #点击客户池
    def click_khc(self):
        self.driver.find_element(*self.kh_khc_locator).click()

    #点击客户关怀
    def click_khgh(self):
        self.driver.find_element(*self.kh_khgh_locator).click()

    #点击新建客户
    def click_xjkh(self):
        self.driver.find_element(*self.kh_xjkh_locator).click()

    #选择客户列表
    def get_table_element(self):
        return self.driver.find_element(*self.kh_khlb_locator)



